package edu.ccut.saturn.studio.wfg.part;

import org.eclipse.draw2d.ChopboxAnchor;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Rectangle;

public class BorderAnchor extends ChopboxAnchor {
protected double angle;
	
	public BorderAnchor(IFigure figure) {
		super(figure);
	}
	/**
	 * 重新计算Box.
	 */
	@Override
	protected Rectangle getBox() {
		Rectangle r = Rectangle.SINGLETON;
//		r.setBounds(new Rectangle(super.getBox().x+getOwner().getBounds().width/2 -25,super.getBox().y+getOwner().getBounds().height/2 -25,50,50));
		r.setBounds(new Rectangle(getOwner().getBounds().x+getOwner().getBounds().width/2 -26,getOwner().getBounds().y+getOwner().getBounds().height/2 -30,50,50));
		return r;
	}
}
